Skip to content

小票机打印

请求参数类型描述
device_idstring小票机设备号
jsonobject声明请求的JSON数据结构
print_order_nostring打印单号
template_idstring模板ID
notify_urlstring回调通知地址
variable_listobject[]变量列表
keystring
valuestring
table_listobject[]表格变量列表
keystring
row_listobject[]
cell_liststring[]
php
$instance->v3->payDevices->printers->_device_id_->printOrders->postAsync([
  'device_id' => 'WINCIE*EIXHRB',
  'json' => [
    'print_order_no' => 'wx8888888888888888',
    'template_id' => 'pt_02583429616371386640209536',
    'notify_url' => 'https://payapp.weixin.qq.com/callback',
    'variable_list' => [[
      'key' => '',
      'value' => '',
    ],],
    'table_list' => [[
      'key' => '',
      'row_list' => [[
        'cell_list' => ['string'],
      ],],
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/pay-devices/printers/{device_id}/print-orders')->postAsync([
  'device_id' => 'WINCIE*EIXHRB',
  'json' => [
    'print_order_no' => 'wx8888888888888888',
    'template_id' => 'pt_02583429616371386640209536',
    'notify_url' => 'https://payapp.weixin.qq.com/callback',
    'variable_list' => [[
      'key' => '',
      'value' => '',
    ],],
    'table_list' => [[
      'key' => '',
      'row_list' => [[
        'cell_list' => ['string'],
      ],],
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/pay-devices/printers/{device_id}/print-orders']->postAsync([
  'device_id' => 'WINCIE*EIXHRB',
  'json' => [
    'print_order_no' => 'wx8888888888888888',
    'template_id' => 'pt_02583429616371386640209536',
    'notify_url' => 'https://payapp.weixin.qq.com/callback',
    'variable_list' => [[
      'key' => '',
      'value' => '',
    ],],
    'table_list' => [[
      'key' => '',
      'row_list' => [[
        'cell_list' => ['string'],
      ],],
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->payDevices->printers->_device_id_->printOrders->post([
  'device_id' => 'WINCIE*EIXHRB',
  'json' => [
    'print_order_no' => 'wx8888888888888888',
    'template_id' => 'pt_02583429616371386640209536',
    'notify_url' => 'https://payapp.weixin.qq.com/callback',
    'variable_list' => [[
      'key' => '',
      'value' => '',
    ],],
    'table_list' => [[
      'key' => '',
      'row_list' => [[
        'cell_list' => ['string'],
      ],],
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/pay-devices/printers/{device_id}/print-orders')->post([
  'device_id' => 'WINCIE*EIXHRB',
  'json' => [
    'print_order_no' => 'wx8888888888888888',
    'template_id' => 'pt_02583429616371386640209536',
    'notify_url' => 'https://payapp.weixin.qq.com/callback',
    'variable_list' => [[
      'key' => '',
      'value' => '',
    ],],
    'table_list' => [[
      'key' => '',
      'row_list' => [[
        'cell_list' => ['string'],
      ],],
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/pay-devices/printers/{device_id}/print-orders']->post([
  'device_id' => 'WINCIE*EIXHRB',
  'json' => [
    'print_order_no' => 'wx8888888888888888',
    'template_id' => 'pt_02583429616371386640209536',
    'notify_url' => 'https://payapp.weixin.qq.com/callback',
    'variable_list' => [[
      'key' => '',
      'value' => '',
    ],],
    'table_list' => [[
      'key' => '',
      'row_list' => [[
        'cell_list' => ['string'],
      ],],
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 。

Published on the GitHub by TheNorthMemory